home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / WASTE 1.2 / Change History next >
Text File  |  1996-06-25  |  17KB  |  239 lines

  1.  
  2. New in WASTE 1.2
  3.  
  4. New version numbering scheme
  5.  
  6. Starting from this release, WASTE will no longer be marked as “alpha”, even if I will keep considering the addition of new features and possibly even changes to the existing API.  This is because WASTE seems pretty stable now so the “alpha” designation may be confusing.
  7.  
  8. WASTELib Shared Library
  9.  
  10. This distribution includes WASTELib, a version of WASTE packaged as a fat shared library which can be used on both PowerPC and 68020+ machines.  Using WASTELib on 68K machines requires the CFM-68K Runtime Enabler.  There are also two versions of the WASTE Demo app: a fat application (PPC/CFM68K) which links dynamically to WASTELib and a classic 68K application.  WASTELib exports this new call:
  11.  
  12.     extern pascal NumVersion WEVersion(void);
  13.  
  14. which returns the library version.
  15.  
  16. API Changes (!)
  17.  
  18. • The edge parameter in various calls is now declared of type WEEdge (= SInt8 = signed char), rather than char.  This may require slight changes to source code.
  19. • In preparation for a future right-to-left savvy version of WASTE, a new direction parameter was added to the WEGetPoint call.  The new prototype looks like this:
  20.  
  21.     extern pascal void WEGetPoint
  22.         (
  23.             SInt32 offset,
  24.             SInt16 direction,
  25.             LongPt *thePoint,
  26.             SInt16 *lineHeight,
  27.             WEReference we
  28.         );
  29.  
  30. Possible values for the direction parameter are leftCaret, rightCaret and hilite (defined in <QuickdrawText.h>).  Until right-to-left support is properly implemented, you should always use hilite.
  31. • The drag translation hook (WEDragTranslateProcPtr) has changed.  Your callback should now be declared like this:
  32.  
  33.     pascal OSErr MyTranslateDrag
  34.         (
  35.             DragReference drag,
  36.             ItemReference dragItem,
  37.             FlavorType requestedType,
  38.             Handle putDataHere,
  39.             SInt32 dropOffset,
  40.             WEReference we
  41.         )
  42.  
  43. While tracking a drag, WASTE will pass nil in putDataHere and -1 in dropOffset: your callback should return noErr if it can convert the specified drag item to the requested type, without actually supplying the data.  If you can’t convert the drag item to the requested type, return badDragFlavorErr.
  44. When the drag is eventually received, WASTE will call you again, passing a valid handle in putDataHere and a valid offset in dropOffset: this time your callback should supply the actual data.
  45. Some applications may prefer to package the drag item data, the drop offset and the WASTE reference into some kind of “insert” Apple event to be handled asynchronously when the drag receive handler is returned; the new extra parameters are meant to make this process easier.
  46.  
  47. Other Changes
  48.  
  49. • WASTE now requires version 2.1 or newer of Apple’s Universal Headers.
  50. • Moved Chris Thomas’s optional modifications to WEScroll to a separate routine, WEPinScroll, which parallels the TextEdit routine TEPinScroll.  As a result, the macro WASTE_PIN_SCROLL is no longer supported.
  51. • Following a suggestion by Timothy Paustian, I added a WEGetClickCount call.
  52. • It is now safe to pass nil in the lineHeight parameter of WEGetPoint, if you don’t want that value returned.
  53. • The macro WASTE_NO_RO_CARET now defaults to 1.
  54.  
  55.  
  56. New in WASTE 1.2a7
  57.  
  58. Bug Fixes
  59.  
  60. • The null style bug fix in WASTE 1.2a6 had a nasty, subtle side effect that could corrupt internal data structures and cause sudden inexplicable crashes.  (Hopefully) fixed.  Bug fixes are evil.  ;-)
  61. • Fixed a number of bugs in the WASTE Demo code (thanks to Chris Thomas).
  62.  
  63. New in WASTE 1.2a6
  64.  
  65. New Features
  66.  
  67. • A new hook (weHiliteDropAreaHook) lets you customize the way WASTE highlights and unhighlights the text area during drag tracking.  By default, WASTE uses the Drag Manager routines ShowDragHilite and HideDragHilite.
  68. • A new mechanism lets you specify an initial refCon value for all embedded objects of a given type: if you call WEInstallObjectHandler like this:
  69.  
  70.   err = WEInstallObjectHandler(myObjectType, weRefCon,
  71.           (UniversalProcPtr) myInitialRefCon, we);
  72.  
  73. WASTE will set the refCon of newly created objects of the given type to myInitialRefCon before calling the NewObject handler.
  74. • A new call, WEGetObjectHandler, complements the existing WEInstallObjectHandler.
  75.  
  76. Bug Fixes
  77.  
  78. • Added some extra code to WESetStyle to work around a rather obscure problem in Tim Paustian’s PowerPlant WASTE wrapper and possibly in other WASTE-using software.
  79. Setting the text style of an empty WASTE instance used to affect only the rather volatile internal “null style” record, but several WASTE calls, including WEReceiveDrag, invalidate the null style, effectively undoing the effects of the WESetStyle call.  When called on an empty WASTE instance, WESetStyle will now propagate the changes to the style table, which can’t be modified except by an explicit call.
  80. • WESetSelection will no longer draw the selection hilite if either weFInhibitRedraw or weFInhibitRecal is set.
  81.  
  82. Other Changes
  83.  
  84. • _WEOldWordBreak, _WEOldCharByte and _WEOldCharType are no longer compiled when building PowerPC projects, since they are only needed for system software prior to version 7.1.
  85.  
  86.  
  87. New in WASTE 1.2a5
  88.  
  89. Bug Fixes
  90.  
  91. • Fixed a bug in _WEIntelligentPaste inadvertently introduced in version 1.2a4 (thanks to Andy Maloney).
  92. • Fixed a bug in _WECopyStyle which affected the condensed and extended styles (thanks to Ed van Zon).
  93. • WEGetChar would previously return negative values for character codes in the range 128 to 255.  Fixed.
  94. • The declarations for uppWEWordBreakProcInfo, uppWECharByteProcInfo and uppWECharTypeProcInfo (and thus the corresponding NewProc and CallProc macros) were incorrect, and the corresponding WEGetInfo/WESetInfo selectors were missing from the public WASTE header.  Fixed (thanks to Todd Grinnell).
  95. • Added some missing stuff to WEPascalPPCGlue.p.
  96.  
  97. Other Changes
  98.  
  99. • Corrected some minor bugs in the demo application.
  100. • Recompiled the demo with CodeWarrior 8.
  101. • Updated the Symantec project file to version 8.0.3 of SC++.
  102. • Updated Internet Config files to version 1.2 of IC.
  103. • Updated Marco’s email address and mailing list information.
  104. • WASTE_KURTHS_OPTION_ARROWS is now TRUE by default.
  105.  
  106.  
  107. New in WASTE 1.2a4
  108.  
  109. Bug Fixes
  110.  
  111. • “SOUP” handles are defined as a tightly concatenated sequence of descriptor + object data + descriptor + object data etc.  Unfortunately, this means that if one of the object data blocks is an odd number of bytes, the following descriptor is misaligned.  In fact, a couple of WASTE routines which directly access descriptors within soups crashed with an address error on 68000 machines (but not on 68020+ and PPC CPUs, which allow misaligned accesses to memory, albeit with a performance penalty).
  112. If caught early, this design flaw could have been fixed by adding some extra padding bytes in situations like this, but changing the SOUP format now would break existing applications, so I chose to fix this bug by modifying the relevant routines to use BlockMoveData to access descriptors within soup handles.
  113.  
  114. • Added a line to _WEHandleUpdateActiveInputArea which is supposed to fix an incompatibility with a commercial input method for KanjiTalk and possibly other input methods as well.  Thanks to Kiyoshi Gomasaki for reporting the problem and suggesting the fix.
  115.  
  116. • WEScroll would sometimes incorrectly redraw the text if you passed values larger than 32,767 in vOffset, since the Toolbox call ScrollRect takes short (16-bit) offsets, while WEScroll deals with long (32-bit) quantities.  Now WEScroll uses a different algorithm when passed large offsets, which fixes this bug and allows for smoother scrolling.  Thanks to Lee Fyock for reporting the bug and for suggesting the fix.
  117.  
  118. • WEUpdate was slightly retouched to prevent a rare cosmetic problem.
  119.  
  120. • In previous versions of WASTE, calling WEUseText on a non-empty instance was not supported and could cause crashes.  Now it should be safe to call WEUseText at any time.
  121.  
  122. • The built-in click loop routine will no longer auto-scroll the text in inactive WE instances.
  123.  
  124. • The function prototype for WEGetLineRange in WASTE.h was wrong.  Thanks to Romain Vignes and Dan Crevier for pointing this out.
  125.  
  126. Other Changes
  127.  
  128. • Handling of URL resolution has been improved.  Now WASTE will let you pass an existing selection to Internet Config without forcing a re-parse.
  129. Additionally, now you can associate “URL hints” to WASTE instances using WESetInfo with the weURLHint selector.  URL hints are strings used by Internet Config to parse “slack” (scheme-less) URLs like “xxx@yyy”: refer to the Internet Config programmer’s documentation for more details.
  130. Here’s some sample code that sets the URL hint of a WASTE instance to “mailto”:
  131.  
  132. OSErr MyWESetDefaultURLHint(WEReference we)
  133. {
  134.     static StringHandle hint = NewString("\pmailto");
  135.     
  136.     return WESetInfo(weURLHint, &hint, we);
  137. }
  138.  
  139. Thanks to Stefan Kurth for suggesting these changes.
  140.  
  141. • I incorporated some code by Jud Spencer which prevents style information from being applied when pasting or dragging text into a WASTE instance if a certain feature flag (weFMonoStyled) is enabled.  This flag also forces WECopy to copy only the TEXT info to the desk scrap.
  142.  
  143. • I incorporated some code by Stefan Kurth which implements the option + left/right arrow key combinations according to Apple’s Human Interface Guidelines.  The old code is still present, however, and you can choose your favorite implementation by setting a compiler variable (WASTE_KURTHS_OPTION_ARROWS) in your prefix file.
  144.  
  145. • The mode parameter in WESetStyle and WEContinuousStyle is now declared as WEStyleMode (= unsigned short), rather than short.
  146.  
  147.  
  148. New in WASTE 1.2a3
  149.  
  150. Bug Fixes
  151.  
  152. • Fixed a bug reported by Tom Bender that had been lurking in WASTE since the very first release.  To see what the bug was, try this in an older version of the WASTE Demo: type “foo bar”, double-click “foo” to select it, and type “moof” to replace “foo”.  Now the caret is at the end of the word “moof”.  Shift-click at the end of “bar”.  See what happened?  “moof” was incorrectly included in the selection.
  153.  
  154. • With earlier versions of WASTE it was sometimes possible to start a drag with the cursor incorrectly set to an I-beam.  To see how, try this in an older version of the WASTE Demo: type “sometimes”, double-click “some”, quickly move the cursor over “times” and click again before the cursor turns into an arrow.  Now WASTE always turns the cursor into an arrow before starting a drag.
  155.  
  156. API Changes
  157.  
  158. • The flags parameter in WENew is now an unsigned long quantity, to allow for up to 32 features to be set independently.
  159.  
  160. • Following a suggestion by Dan Crevier, a new feature flag has been added: weFInhibitRedraw.  I think Dan said this feature will be used in a new version of the WASTE TCL classes.
  161.  
  162. • WASTE now has a built-in click loop routine that provides default autoscrolling behavior.  Replacing the built-in click loop is still possible, of course, but wait: most applications using TextEdit or earlier versions of WASTE install a click loop callback for the sole purpose of keeping the scroll bars in sync with the text, and WASTE provides a simpler mechanism for this (i.e., the scroll callback), so from now on click loops should prove unnecessary in many cases.
  163.  
  164. • I added a WEGetLineRange call that returns the start and end offsets of a line given its line number (first line = 0).
  165.  
  166. • I added a WEUseSoup call to complement the existing WEUseStyleScrap.  Given a soup handle, this new call applies it to the selection range, much like WEUseStyleScrap does for a 'styl' handle.
  167.  
  168. New WASTE Demo application
  169.  
  170. WASTE 1.2a3 comes with a new WASTE Demo application, written in C, brought to you by John C. Daub and me (Marco).  This demo is mainly based on the pascal demo app, but with a few differences:
  171.  
  172. • John added some functionality lacking in the original code, e.g. better handling of the save command.  I plan to add more features in the future (e.g., printing).
  173.  
  174. • The demo is based on version 2.1 of the Universal Headers and it can be compiled with the STRICT_WINDOWS, STRICT_CONTROLS and STRICT_MENUS options turned on.  This required a few changes in the code.
  175.  
  176. Other Changes
  177.  
  178. • Pascal support is back.  I have included updated interface and glue files needed to use WASTE from a Pascal program.
  179.  
  180. • This version supports the Symantec C++ 8.0 compiler.  A project file for the demo app is included in the distribution.
  181.  
  182. • The WASTE.h public header file now defines the WASTE_VERSION macro as the current version of the library, in standard NumVersion format (e.g., version 1.2a3 is expressed as 0x01204003).
  183.  
  184. • WASTE now allows lines to be one pixel tall.  Previously WASTE forced the line height to be at least two pixels, even when using very small font sizes.  Thanks to Jeff Gold for suggesting this change.
  185.  
  186.  
  187. New in WASTE 1.2a2
  188.  
  189. • Switched to version 2.1 of the Universal Headers (MacOSEventModifiers is now called EventModifiers).  Version 2.0 is still supported, though.
  190.  
  191. • You can now #define variables like WASTE_DEBUG and WASTE_IC_SUPPORT in a prefix file compiled before WASTEIntf.h, if you want to override the default settings.  Previously, you had to make changes to WASTEIntf.h.  (Thanks to Dan for suggesting this.)
  192.  
  193. • Due to overwhelming popular demand, WECalText no longer redraws the text after recalculating line breaks, unless WASTE_WECALTEXT_DOES_REDRAW is #defined to TRUE when WASTE is compiled.
  194.  
  195. • Time-related quantities expressed in ticks are now declared as unsigned long rather than long, as per the Universal Headers.  Some API functions were changed accordingly.
  196.  
  197. • Worked around an obscure bug in the System whereby the Drag Manager calls _WESendFlavor with a bogus A5 world when a WASTE-generated drag ends up in a TSM floating window.  You can reproduce this bug using “HoverBar”, a shareware program.  This bug only affects 68K binaries.
  198.  
  199. • WESetStyle now accepts a new mode, weDoFaceMask, which lets you set some styles, clear other styles and leave all other styles untouched, all in a single call.  When you use this mode, the filler byte of the TextStyle record passed to WESetStyle is used as a mask which determines which styles are affected.  Here’s an example:
  200.  
  201.     TextStyle ts;
  202.     OSErr err;
  203.     
  204.     // set the bold style and clear the italic style,
  205.     // without touching any other style
  206.     ts.tsFace = bold;
  207.     ts.filler = bold + italic;
  208.     err = WESetStyle(weDoFaceMask, &ts, we);
  209.  
  210. This feature should prove useful for scripting purposes.
  211.  
  212.  
  213. New in WASTE 1.2a1
  214.  
  215. • This version is based on Dan’s C-WASTE 1.1r16.  I will no longer support the Pascal version.
  216.  
  217. • I made several changes to the source code in an attempt to remove some “pascalisms” that look a bit ugly in C.  ;-)
  218.  
  219. • Some frequently used routines in WELowLevelEditing have been slightly optimized.
  220.  
  221. • Many WASTE-based applications don’t need embedded objects, so WASTE can now be compiled without the code for supporting them: just #define WASTE_OBJECTS to 0 in WASTEIntf.h.
  222. The API will remain the same, with the following exceptions:
  223.   - The tsObject field of the WERunInfo record returned by WEGetRunInfo will be undefined, so your app should ignore it.
  224.   - WASTE will ignore the hSoup parameter in WECopyRange and WEInsert, so pass NULL in hSoup.
  225.   - Routines like WEInsertObject, WEInstallObjectHandler, etc. won’t be compiled, so attempts to use them will result in link errors.
  226.  
  227. • It is now safe to pass NULL in the edge parameter of WEGetOffset if you don’t want the value returned.
  228.  
  229. • Ditto for the redoFlag parameter of WEGetUndoInfo.
  230.  
  231. • On PPC systems, WENew now uses a different strategy for determining if a double-byte script system is installed, since the WorldScript Power Adapted breaks the usual check for smDoubleByte.  I haven’t checked if this works, though.
  232.  
  233. • On PPC systems, WENew makes sure that the address of NewDrag is non-zero before assuming that the Drag Manager is available.
  234.  
  235. • WESetStyle now accepts two extra flags in the mode parameter, that allow you to change the font in a script-sensitive manner.  This feature has not been thoroughly tested yet.  Thanks to Jonathan Kew for providing the code.
  236.  
  237. • You can now supply an optional “streaming” object handler that WASTE will use to get “flat” data from an object to be written to the Clipboard, to a drag or to a soup.  This is an untested experimental feature that may change in future versions.
  238.  
  239. • Operations involving heavily styled text should now be significantly faster.  Previously WASTE would call the Font Manager routine GetFontInfo once for each style run when applying a style scrap.  The Metrowerks Profiler revealed that this call is very time consuming, so now GetFontInfo is only called for new styles that aren’t used anywhere else in the text.